<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * history.php
 * @author ranuandra
 *
 * 8 Sep 2011 09:51:28
 *
 * 
 */
if(isset($header))
{
	echo $header;
}
?>
<div class="tbldata">

<table class="data tablesorter" class="center">
	<thead>
		<tr>
			<th>Tahun</th>
			<th>Area</th>
			<th>Jumlah Kendaraan</th>
		</tr>
	<thead>
	<tbody>
<?php

if($post['kethn'] > $post['drthn'])
{

	for($i=$post['kethn']; $i>=$post['drthn']; $i--)
	{
		//echo $i;
		$coba = new Model_Report();
		$datas = $coba->databytahun($post, $i);
		
		$first = 0;
		foreach($datas as $data)
		{
?>
		<tr>

			<td><?php
					if($first == 0)
					{
						echo $i;
					}
				
			?></td>
			<td><?php echo $data['area'] ?></td>
			<td><?php echo $data['jumlah'] ?></td>
		</tr>
<?php 
			$first = 1;
		}
?>
		
<?php 				
	}
}
?>